#include<bits/stdc++.h>

using namespace std;

int main() {
    int x;
    cin >> x;
    int a, b, c;
    c = x % 10;
    b = x / 10 % 10;
    a = x / 100;

    cout << c * 100 + b * 10 + a;
    return 0;
}


